package xdj.android.personal.namespace.Business;

import java.util.List;

import xdj.android.personal.namespace.Entity.ArrivedResultEntity;
import android.content.Context;
import android.database.SQLException;

public class ArrivedResultDBAccess extends
		BaseDBAccess<ArrivedResultEntity, ArrivedResultEntity>
{

	MyDataBaseHelper _dbHelper;

	public ArrivedResultDBAccess(Context context)
	{
		_dbHelper = DBAccessHelper.DownloadDataBase(context);
	}

	@Override
	public Boolean OpenConnection(String path)
	{
		// TODO Auto-generated method stub
		return super.OpenConnection(path);
	}

	@Override
	public Boolean CLoseConnection()
	{
		// TODO Auto-generated method stub
		return super.CLoseConnection();
	}

	@Override
	public int Insert(List<ArrivedResultEntity> modeList)
	{
		int count = 0;
		try
		{
			for (ArrivedResultEntity entity : modeList)
			{
				String sqlString = "inset into ArrivedResult VALUES (?,?)";
				_dbHelper.getWritableDatabase().execSQL(sqlString, new String[]
				{ entity.IdposId, entity.ArrivedTime.toString() });
				count++;
			}

		} catch (SQLException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return count;
	}

	@Override
	public Boolean Query(ArrivedResultEntity para)
	{
		// TODO Auto-generated method stub
		return super.Query(para);
	}

	@Override
	public ArrivedResultEntity GetOneQueryResult()
	{
		// TODO Auto-generated method stub
		return super.GetOneQueryResult();
	}

	@Override
	public List<ArrivedResultEntity> GetAllQueryResults()
	{
		// TODO Auto-generated method stub
		return super.GetAllQueryResults();
	}

	@Override
	public int Delete(List<ArrivedResultEntity> paraList)
	{
		// TODO Auto-generated method stub
		return super.Delete(paraList);
	}

	@Override
	public int Update(List<ArrivedResultEntity> paraList)
	{
		// TODO Auto-generated method stub
		return super.Update(paraList);
	}

	@Override
	public Boolean DeleteTableData(String tableName)
	{
		// TODO Auto-generated method stub
		return super.DeleteTableData(tableName);
	}

}
